

<%@page import="classes.order"%>
<%@page import="classes.user"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.sql.SQLException"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%ArrayList<order> orders = (ArrayList<order>) session.getAttribute("factura");%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!doctype html>
<html class="no-js" lang="en"> <!--<![endif]-->
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

	<title>- F1 Store -</title>
	

	<meta name="viewport" content="width=device-width,initial-scale=1">

	<link rel="stylesheet" href="css/bill.css">



<script>

function about()
{
alert("Aplicacion realizada por:\nAlvaro Garcia Ojea\n5º Ingenieria informatica.\n\nEmail: alvarogarcia9@gmail.com");
}
</script>




</head>
<body>




<%
                if (orders == null) {%>

        <%} else {
                for (order o : orders) {%>

                        
<div id="container">
    <div id="print" role="main">
        <div id="facturaTitulo">Invoice:  <%=o.getCustomersecondname()%>, <%=o.getCustomername()%> - number <%=o.getId()%></div><br/>
        <img src="images/logoshop2.png" width="410" height="165">
    <div id="addresscontact">Alvaro F1 Shop<br/>
      Calle Galileo, 27<br/>
    28015, MADRID</div>
    
    
        <table id="idDate">
            <tr>
                <th>Invoice number: </th>
                <td><%=o.getId()%></td>
            </tr>
            <tr>
                <th>Date</th>
                <td><%=o.getPaymentdate()%></td>
            </tr>
        </table>
        <h2>
		<strong>PRODUCTS</strong></h2>
        <table width="50%" border="0">
		  <tr>
		    <th width="13%" align="left" scope="col">Name:</th>
		    <th width="24%" scope="col"><div align="left"><%=o.getProduct()%></div></th>
		    <th width="11%" align="left" scope="col">Price:</th>
		    <th width="18%" scope="col"><div align="left"><%=o.getPrice()%> €</div></th>
		    <th width="15%" align="left" scope="col">Qty:</th>
		    <th width="19%" scope="col"><div align="left"><%=o.getQty()%> items</div></th>
	      </tr>
	  </table>
		<h3><br/>
		  <br/>
		  
		  
	  </h3>
	  <h2><strong>Ship to:</strong></h2>
      <p> <%=o.getCustomername()%> <%=o.getCustomersecondname()%></p>
      <p> <%=o.getCustomerstreet()%> St. <%=o.getCustomernumber()%>,<%=o.getCustomerfloor()%>º  <%=o.getCustomerletter()%></p>	  <p><%=o.getCustomercity()%>, <%=o.getCustomercountry()%> </p>
    </div><!--print-->
    
            <%}
                }%>

    
    <div id="no-print">
        <br/>
        <table width="80%" id="facturaTitulo">
            <thead>
                <td width="33%"><div align="left"><a href="Scart.jsp">Back</a></div></td>
                <th width="34%"><A id="printBtn" href="javascript:window.print()">Print</A></th>
                <td width="33%"><!--<a <href="http://www.web2pdfconvert.com/convert">Guardar en PDF</a>--> <div align="right">Save as PDF</div></td>
        </table>
    </div>
</div>
</body>
</html>